import com.day20180916.Axe;
import com.day20180916.Hero;
import com.day20180916.Weapon;
import com.day20180916.WeaponFactory;

public class test {*

    public static void main(String[] args) {

//        Hero hero = new Hero();
//        hero.setName("龙哥");
//        System.out.println(hero.toString());
//        Weapon weapon = new Axe();
//        weapon.attack();

        Weapon weapon = WeaponFactory.getInstance().getWeapon("className");
        weapon.attack();
    }

}
